package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * File entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_FILE")
public class File implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 8680066759742667842L;
	private String fileName;
	private String fileDate;
	private String fileFlag;
	private String fileType;
	private Integer fileSize;
	private String filePosition;
	private String fileProcess;

	// Constructors

	/** default constructor */
	public File() {
	}

	/** full constructor */
	public File(String fileName, String fileDate, String fileFlag, String fileType,
			Integer fileSize, String filePosition, String fileProcess) {
		this.fileName = fileName;
		this.fileDate = fileDate;
		this.fileFlag = fileFlag;
		this.fileType = fileType;
		this.fileSize = fileSize;
		this.filePosition = filePosition;
		this.fileProcess = fileProcess;
	}

	// Property accessors

	@Id
	@Column(name = "FILE_NAME", nullable = false, length = 60)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "FILE_DATE", nullable = false, length = 8)
	public String getFileDate() {
		return fileDate;
	}

	public void setFileDate(String fileDate) {
		this.fileDate = fileDate;
	}

	@Column(name = "FILE_FLAG", nullable = false, length = 1)
	public String getFileFlag() {
		return this.fileFlag;
	}

	public void setFileFlag(String fileFlag) {
		this.fileFlag = fileFlag;
	}

	@Column(name = "FILE_TYPE", nullable = false, length = 1)
	public String getFileType() {
		return this.fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	@Column(name = "FILE_SIZE", nullable = false)
	public Integer getFileSize() {
		return this.fileSize;
	}

	public void setFileSize(Integer fileSize) {
		this.fileSize = fileSize;
	}

	@Column(name = "FILE_POSITION", nullable = false, length = 80)
	public String getFilePosition() {
		return this.filePosition;
	}

	public void setFilePosition(String filePosition) {
		this.filePosition = filePosition;
	}

	@Column(name = "FILE_PROCESS", nullable = false, length = 1)
	public String getFileProcess() {
		return this.fileProcess;
	}

	public void setFileProcess(String fileProcess) {
		this.fileProcess = fileProcess;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof File))
			return false;
		File castOther = (File) other;

		return ((this.getFileName() == castOther.getFileName()) || (this
				.getFileName() != null && castOther.getFileName() != null && this
				.getFileName().equals(castOther.getFileName())))
				&& ((this.getFileFlag() == castOther.getFileFlag()) || (this
						.getFileFlag() != null
						&& castOther.getFileFlag() != null && this
						.getFileFlag().equals(castOther.getFileFlag())))
				&& ((this.getFileType() == castOther.getFileType()) || (this
						.getFileType() != null
						&& castOther.getFileType() != null && this
						.getFileType().equals(castOther.getFileType())))
				&& ((this.getFileSize() == castOther.getFileSize()) || (this
						.getFileSize() != null
						&& castOther.getFileSize() != null && this
						.getFileSize().equals(castOther.getFileSize())))
				&& ((this.getFilePosition() == castOther.getFilePosition()) || (this
						.getFilePosition() != null
						&& castOther.getFilePosition() != null && this
						.getFilePosition().equals(castOther.getFilePosition())))
				&& ((this.getFileProcess() == castOther.getFileProcess()) || (this
						.getFileProcess() != null
						&& castOther.getFileProcess() != null && this
						.getFileProcess().equals(castOther.getFileProcess())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getFileName() == null ? 0 : this.getFileName().hashCode());
		result = 37 * result
				+ (getFileFlag() == null ? 0 : this.getFileFlag().hashCode());
		result = 37 * result
				+ (getFileType() == null ? 0 : this.getFileType().hashCode());
		result = 37 * result
				+ (getFileSize() == null ? 0 : this.getFileSize().hashCode());
		result = 37
				* result
				+ (getFilePosition() == null ? 0 : this.getFilePosition()
						.hashCode());
		result = 37
				* result
				+ (getFileProcess() == null ? 0 : this.getFileProcess()
						.hashCode());
		return result;
	}
}